<script language="javascript">
function calendar_onchange(){
	//alert('f.submit();');
	document.f.submit();
}
</script>
<% form_tag( {:action => 'index', :move => 0}, :id=>'f', :name=>"f") do %>
﻿	﻿<div class=head>今日报告 - 
	<input name="seldate" type="text" id="date" onclick="new Calendar().show(this);" size="9" maxlength="10" readonly="readonly"
	value="<%= session[:date].strftime("%Y-%m-%d")%>" /></div>
	<input type='submit' style='display:none' />
<% end %>

<div class=menu>
<%= link_to '前一天', :action => 'index', :move => -1 %> |
<%= link_to '今天', :action => 'index', :today => 1 %> |
<%= link_to '下一天', :action => 'index' , :move => 1 %> 
<hr size=1 />
</div>
<div class=area>
<ul>
  <% for user in @all_users %>
    <li>
        <%= link_to user.name, :controller => 'dashboard', :action => 'index', :user => user %>[<%= h(user.full_name)%>] ——          
        <%= user.todos.count(:all, :conditions => ["create_for_date = ?", session[:date]]) %> 项任务， 已完成 <%= user.todos.count(:all, :conditions => ["create_for_date = ? and check_state = 1", session[:date]]) %> 项。
    </li>
  <% end %>
</ul>
</div>